Skip to content

Add clang-format-19 CI workflow with PR review suggestions#6

Merged
eisenwave merged 1 commit into
mainfrom
copilot/add-clang-format-checks
May 13, 2026
Merged

Add clang-format-19 CI workflow with PR review suggestions#6
eisenwave merged 1 commit into
mainfrom
copilot/add-clang-format-checks

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor

Introduces a dedicated clang-format workflow that enforces formatting with clang-format-19 and surfaces suggested fixes directly on pull requests. The workflow mirrors the ulight pattern while adapting file selection to this repository’s tracked C/C++ sources.

  • Workflow scope and triggers

    • Added .github/workflows/clang-format.yml
    • Runs on push and pull_request to main
    • Uses explicit permissions for checks/issues/PR annotations
  • Formatting enforcement

    • Installs clang-format-19 on ubuntu-latest
    • Formats tracked *.c, *.cpp, *.h, *.hpp files via git ls-files
    • Fails when formatting drift exists using git diff --exit-code
  • PR review suggestions

    • On pull requests, runs reviewdog/action-suggester@v1
    • Publishes inline suggested changes derived from formatting edits
- name: Run clang-format
  run: >
    git ls-files '*.cpp' '*.c' '*.hpp' '*.h' |
    xargs -r clang-format-19 -i

- name: Suggest clang-format fixes
  if: github.event_name == 'pull_request'
  uses: reviewdog/action-suggester@v1
  with:
    tool_name: clang-format-19
    fail_level: any
    level: warning

@eisenwave eisenwave marked this pull request as ready for review May 13, 2026 20:17
@eisenwave eisenwave merged commit 0d34105 into main May 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants